<!-- 管理员查看商品页面 -->
<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
    <title>管理员查看商品页面</title>
</head>
<?php 
include_once("inc.php");
include_once("base.php");
$tb_name = "goods";
if ($_REQUEST["id"]) {
	$rs = db_get_row("select * from $tb_name where id=". $_REQUEST["id"]);
}
?>
<body>
	<table width="100%" border="0" cellpadding="0" cellspacing="0">
		<tr>
			<td width="17" rowspan="2" valign="top" bgcolor="#FFFFFF"></td>
			<td valign="top">
				<table width="100%" height="31" border="0" cellpadding="0" cellspacing="0">
					<tr bgcolor="#FFFFFF">
						<td height="31"><div class="title">查看商品</div></td>
					</tr>
				</table>
			</td>
			<td width="16" rowspan="2" bgcolor="#FFFFFF"></td>
		</tr>
		<tr>
			<td valign="top" bgcolor="#F7F8F9">
				<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
					<tr><td colspan="4" height="10"></td></tr>
					<tr>
						<td width="1%">&nbsp;</td>
						<td width="96%">
							<table width="100%">
								<tr>
									<td colspan="2">
										<form name="form1" method="post" action="?" onSubmit="return checkadd()"  enctype="multipart/form-data">
											<input type="hidden" name="id" value="<?php echo $rs["id"];?>" />
											<input type="hidden" name="pnumber1" value="<?php echo $rs["pnumber"];?>" />
											<input type="hidden" name="pid" value="<?php echo $_REQUEST["pid"];?>" />
											<table width="100%" class="cont">
												<tr>
													<td width="120" align="right">
														<span class="red">*</span> 商品名称：
													</td>
													<td>
														<input name="title" type="text" class="text" style="width:350px;" value="<?php echo $rs["title"];?>" disabled="disabled">
													</td>
												</tr>
												<?php 
												$categoryA = db_get_all("select * from category where pid=".$_REQUEST["pid"]." order by id asc");
												if(!empty($categoryA[0])){?>
												<tr>
													<td align="right">
														<span class="red">*</span> 分类：
													</td>
													<td>
														<select name="categoryid">
															<?php foreach($categoryA as $row) {?>
															<option value="<?php echo $row["id"];?>" <?php if($rs["categoryid"]==$row["id"]){echo ' selected="selected" ';}?>><?php echo $row["title"];?></option>
															<?php } ?>
														</select>
													</td>
												</tr>
												<?php }?>
												<tr>
													<td align="right"><span class="red">*</span> 新旧程度：</td>
													<td><input name="mark1" type="text" class="text" size="30"  maxlength="20" value="<?php echo $rs["mark1"];?>" disabled="disabled"></td>
												</tr>
												<tr>
													<td align="right"><span class="red">*</span> 原价：</td>
													<td><input name="mprice" type="text" class="text" size="30"  maxlength="20" value="<?php echo $rs["mprice"];?>" disabled="disabled"></td>
												</tr>
												<tr>
													<td align="right"><span class="red">*</span> 现价：</td>
													<td><input name="sprice" type="text" class="text" size="30"  maxlength="20" value="<?php echo $rs["sprice"];?>" disabled="disabled"></td>
												</tr>
												<tr>
													<td align="right"><span class="red">*</span> 商品数量：</td>
													<td><input name="amount" type="text" class="text" size="30"  maxlength="20" value="<?php echo $rs["amount"];?>" disabled="disabled"></td>
												</tr>
												<tr>
													<td align="right">商品图片：</td>
													<td>
														<img src="../Public/Upload/<?php echo $rs["img"];?>" height="300" width="300"/>
													</td>
												</tr>
												<tr>
													<td align="right">商品介绍：</td>
													<td><?php echo $rs['content'];?></td>
												</tr>
												<tr>
													<td align="right">&nbsp;</td>
													<td><input name="button" type="button" class="btn" onClick="javascript:history.back();" value="返回"></td>
												</tr>
											</table>
										</form>
									</td>
								</tr>
							</table>
						</td>
						<td width="1%">&nbsp;</td>
					</tr>
					<tr><td height="20"></td></tr>
				</table>
			</td>
		</tr>
	</table>
</body>
</html>